|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfurny.ga.util.FurnLayoutIOUtil
public final class FurnLayoutIOUtil
Utility class for handling furniture IO.
Field Summary | |
---|---|
private static java.io.File |
lastDir
|
private static java.util.logging.Logger |
LOGGER
|
Constructor Summary | |
---|---|
private |
FurnLayoutIOUtil()
Instantiation is not allowed. |
Method Summary | |
---|---|
static FurnLayoutIndividual |
loadGenotype(java.awt.Component parent,
FurnLayoutIndividual ind)
Loads a furniture layout individual by opening a JFileChooser ,
loading and parsing the file. |
static boolean |
parse(FurnLayoutIndividual ind,
java.lang.String string)
Parses the content of a furniture layout individual from a string. |
static FurnLayoutIndividual |
parseIndividual(java.lang.String string)
Creates a furniture layout individual from a string. |
static java.lang.String |
printGenotypes(java.util.List<FurnLayoutIndividual> list)
Prints the simple genotypes of a list of individuals to a string. |
static java.lang.String |
printSimpleGenotype(long[][] store)
Prints the simple genotype to a string. |
static int |
saveGenotype(java.awt.Component parent,
FurnLayoutIndividual ind)
Saves a furniture layout individual by opening a JFileChooser ,
writing and saving the file. |
static void |
writeFitness(FurnLayoutIndividual ind,
java.lang.StringBuilder sb)
Writes the fitness of a furniture layout individual to a string builder. |
static void |
writeSimpleGenotype(long[][] store,
java.lang.StringBuilder sb)
Prints the simple genotype to a string builder. |
static void |
writeSimpleGenotypeHeader(java.lang.StringBuilder sb)
Writes the header of a simple genotype to a string builder. |
static void |
writeSimpleGenotypeSet(long[][] store,
java.lang.StringBuilder sb)
Prints the simple genotype in set notation to a string builder. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.util.logging.Logger LOGGER
private static java.io.File lastDir
Constructor Detail |
---|
private FurnLayoutIOUtil()
Method Detail |
---|
public static java.lang.String printSimpleGenotype(long[][] store)
store
- The simple genotype.
public static java.lang.String printGenotypes(java.util.List<FurnLayoutIndividual> list)
list
- The list of individuals.
public static FurnLayoutIndividual parseIndividual(java.lang.String string)
string
- The string to parse.
public static boolean parse(FurnLayoutIndividual ind, java.lang.String string)
ind
- Individual to parse to.string
- The string to parse.
public static void writeSimpleGenotypeHeader(java.lang.StringBuilder sb)
sb
- The string builder.public static void writeSimpleGenotype(long[][] store, java.lang.StringBuilder sb)
store
- Simple genotype.sb
- String builder.public static void writeSimpleGenotypeSet(long[][] store, java.lang.StringBuilder sb)
store
- The simple genotype.sb
- The string builder to write to.public static void writeFitness(FurnLayoutIndividual ind, java.lang.StringBuilder sb)
ind
- The individual.sb
- The string builder to write to.public static FurnLayoutIndividual loadGenotype(java.awt.Component parent, FurnLayoutIndividual ind)
JFileChooser
,
loading and parsing the file.
parent
- Parent for the file chooser, may be null
.ind
- The individual to write the genotype to, may be null
.
public static int saveGenotype(java.awt.Component parent, FurnLayoutIndividual ind)
JFileChooser
,
writing and saving the file.
parent
- Parent for the file chooser, may be null
.ind
- The individual to save.
JOptionPane.OK_OPTION
if all is ok.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |